import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class SecondRecruit1FinishState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
        //console.log('SecondRecruit1FinishState state--begin');
        const main = this.getUserData() as Main;


        main.frontBg.playAnimation(Constant.FrontBgAni.Close, 0.2, () => {
            main.scheduleOnce(() => {
                main.frontBg.playAnimation(Constant.FrontBgAni.Appear, 0.2, () => {
                    main.mainFsm.goToState(Constant.MainState.ClearSecondRecruit1, main);
                }, this);
            }, 1)
        }, this);
    }
}